<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>

</head>
<body>
<h3>用户查询</h3>
<form action="${pageContext.request.contextPath}/findStuByKey.action" method="post">
    请输入学生姓名关键字：<input type="text" name="key">
    <input type="submit" value="查询">
</form>
<c:choose>
    <c:when test="${key==null || key==''}">
        ${msg }
    </c:when>
    <c:when test="${err==null || err==''}">
        显示数据库表<br>
        满足学生姓名查询关键字：<font color=red>${key }</font> 的条件如下：<br>
        <table border="1">
            <tr>
                <th>序号</th>
                <th>姓名</th>
                <th>班级</th>
                <th>专业</th>
            </tr>
            <c:forEach var="lists" items="${lookListJSTL}" varStatus="s">
                <tr>
                    <td>${s.count}</td>
                    <td>${lists.username}</td>
                    <td>${lists.userclass}</td>
                    <td>${lists.sort}</td>
                </tr>
            </c:forEach>

        </table>
    </c:when>
    <c:otherwise>
        ${err }
    </c:otherwise>
</c:choose>

<br>
<br>
<a href="${pageContext.request.contextPath }/admin/welcome.jsp">返回</a>
<br>
</body>
</html>
